//
//  PublicDatabaseEngine.h
//  GrowUP
//
//  Created by Hobo.Chen on 7/9/11.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <sqlite3.h>




@interface PublicDatabaseEngine : NSObject {
	sqlite3	*database;
}
+ (PublicDatabaseEngine *)sharedDatabaseEngine;


- (NSMutableDictionary *)selectOneWithSQL:(NSString *)sql  select:(NSArray *)array;
- (NSArray *)searchWithSQL:(NSString *)sql  select:(NSArray *)array;
- (NSArray *)searchBlobWithSQL:(NSString *)sql;



- (BOOL)executeSQL:(NSString *)sql;
- (int)insertOrReplaceWithSQL:(NSString *)sql;

- (NSString *)dataFilePath:(NSString *)filename;


//me
- (NSDictionary *)selectJsonDataWithSQL:(NSString *)sql;
-(NSMutableArray *)selectJsonArrayWithSQL:(NSString *)sql;
- (NSMutableArray *)selectTLRulerWithSQL:(NSString *)sql;

//
- (NSString *)selectJsonStringWithSQL:(NSString *)sql;

//bapoo
- (NSString *)selectBapooResultStringWithSQL:(NSString *)sql;
- (NSString *)selectBapooAdeviseStringWithSQL:(NSString *)sql;


- (BOOL)isValueExitWithSQl:(NSString *)sql;
@end
